from requests import Session

# 通过会话的方式进行访问
s = Session()
r = s.get("http://127.0.0.1:8000/auth/", params={"username": "admin",
                                                 "password": "123456"})
print(r.status_code)
print(r.text)


r = s.post("http://127.0.0.1:8000/upload/", files={"file": open("./笔记.md", "rb")})
print(r.status_code)
print(r.text)

